﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ORMAC.UI.WPF.ViewModel
{
    public class SelectObjectsViewModel:ImportFormViewModelBase
    {
        public List<DBObjectInfoEx> Objects
        {
            get
            {
                if (this is SelectTablesViewModel)
                    return this.OrmacConfig.Tables;
                else if (this is SelectStoredProceduresViewModel)
                    return this.OrmacConfig.StoredProcedures;
                else
                    throw new NotImplementedException();
            }
            set
            {
                if (this is SelectTablesViewModel)
                    this.OrmacConfig.Tables=value;
                else if (this is SelectStoredProceduresViewModel)
                    this.OrmacConfig.StoredProcedures=value;
                else
                    throw new NotImplementedException();

            }
        }
    }
}
